/**
 * Created by Administrator on 2015/6/1.
 */

    var should = require('should');
var settings = require('../settings');
var DB = require('../models/db');

var Db = require('mongodb').Db;
var Server = require('mongodb').Server;
/*数据库连接信息host,port,user,pwd*/
var db_name = settings.db;                  // 数据库名，从云平台获取
var db_host =  'mongo.duapp.com';      // 数据库地址
var db_port =  '8908';   // 数据库端口
var username = settings.username;                 // 用户名（API KEY）
var password = settings.password;                 // 密码(Secret KEY)

describe('Mongodb', function () {
    it('connect should be success', function (done) {
        DB.connect(function (err, db) {
            should.not.exist(err);
            db.close();
            done();
        });

    })
})

